Skip to content

Remove unnecessary PDO test mock classes#2114

Merged
MasterOdin merged 6 commits into0.xfrom
pdo-mock
Oct 8, 2022
Merged

Remove unnecessary PDO test mock classes#2114
MasterOdin merged 6 commits into0.xfrom
pdo-mock

Conversation

@MasterOdin
Copy link
Copy Markdown
Member

@MasterOdin MasterOdin commented Oct 7, 2022

Per the comment at the top of tests/Phinx/Db/Mock/PdoAdapterTestPDOMockWithExecChecks.php, it was only added because of an error that would occur under PHP 5.4 when trying to use $this->getMockForAbstractClass(\PDO::class). Given that we no longer support that version of PHP, we should try to move back to the expected way of doing PHPUnit mocks.

I found I could also remove tests/Phinx/Db/Mock/PdoAdapterTestPDOMock.php on somewhat similar grounds that it's easy enough to just make a PDO mock via phpunit for the one test it was used.

This class is also throwing a fatal error in #2113 and seems easier to kill off this class altogether than try to debug whatever is going wrong there.

@MasterOdin MasterOdin changed the title Remove unnecessary PDO test stub class Remove unnecessary PDO mock classes Oct 7, 2022
@MasterOdin MasterOdin changed the title Remove unnecessary PDO mock classes Remove unnecessary PDO test mock classes Oct 7, 2022
@MasterOdin MasterOdin merged commit d6e9fbd into 0.x Oct 8, 2022
@MasterOdin MasterOdin deleted the pdo-mock branch October 8, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant